Market requirements, environmental needs, business costs, and limited battery life dictate that computing devices use as little energy as possible while still providing robust computing services. The energy consumed by a computing device can be more efficiently managed by providing enough computational power for each service as needed instead of providing maximum computational power at all times. Computing devices such as laptop, desktop, and mainframe computers, personal digital assistants (PDAs), cellular telephones, etc., provide services by causing program instructions to be executed by electronic circuitry. The electronic circuitry that executes computer program instructions in a computing device is often contained in a single integrated circuit referred to as a “core.” A core is contained in a single physical package often referred to as a “microprocessor” or simply a “processor.” Moreover, multiple interacting cores may be contained in a single processor.
Most computing devices execute a computer program commonly referred to as an operating system that guides the operation of the computing device and provides services to other programs. More specifically, an operating system controls the allocation and usage of hardware resources such as memory, computing resources, mass memory storage, peripheral devices, etc. The computer instructions for initializing and operating the computing device are typically contained in a component of the operating system often referred to as the “kernel.” Shortly after a computing device is started, the kernel begins executing. Since a kernel has direct control of the hardware and access to data that describes the state of a computing device, a kernel may be used to regulate computing power and otherwise control energy consumption.
In some existing systems, software components in a kernel reduce the consumption of power used by a processor through the use of processor idle sleep states (hereinafter sometimes referred to as “C-states”). For example, some computers adhere to a specification commonly known as Advanced Configuration and Power Interface (“ACPI”). In this example, when a computer is put into in any of the available C-states, instructions are not executed. However, a processor will regularly “wake up” or exit the idle sleep state and transition back to the working state automatically when any user or platform activity occurs so that instructions may be executed. Then, the processor will be put back to “sleep” to save power. Since the processor is able to enter and exit idle sleep states very quickly, the user experience of interacting with programs is not affected when the processor is put into an idle sleep state.
When a predetermined threshold amount of idleness is identified, a processor may transition from the working state (“C0”) in which the processor consumes the most amount of power into an initial idle C-state (“C1”). Traditionally, when a processor is in an idle C-state (e.g., “C1”) and an additional predetermined threshold amount of idleness is identified over a given time period, the processor transitions from the current C-state (e.g., “C1”) into the next higher or deeper C-state (e.g., “C2”). On one hand, each successively higher C-State provides greater levels of power savings. On the other hand, a higher C-state is associated with a greater latency overhead required to exit the idle sleep state. Stated differently, using a higher C-state than is appropriate based on the idleness of the processor could adversely affect system responsiveness and the user experience. As a result, existing systems use a linear promotion and demotion scheme for selecting a C-state in which a predetermined amount of time is accrued in a C-state before a promotion or demotion to the next appropriate C-state occurs. However, a linear promotion/demotion scheme for transitioning between C-states does not take advantage of recent advances in hardware technology. Instead, additional power savings may be achieved by using a non-linear scheme for setting an appropriate processor state.